<template>
	<view>
		<view class="edgeInsetTop"></view>
		<view class="cu-form-group">
			<view class="title"> {{$getText('截屏后提示')}} </view>
			
			<switch @change="screenshot" :checked="common.config.screenshot"/>
		</view>
		<view class="cu-form-group ">
			
			<view class="title"> {{$getText('开启屏幕旋转')}} </view>
			
			<switch @change="position" :checked="common.config.position"/>
		</view>
		<view class="cu-form-group ">
			<view class="title"> {{$getText('获取地理位置')}} </view>
			
			
			<switch @change="map" :checked="common.config.map"/>
		</view>
		<home></home>
	</view>
</template>
<script>
	import { mapState } from 'vuex';
	
	import home from '@/components/home/index'
	export default {
		components: {
			home
		},
		computed: {
			...mapState(['common']),
			...mapState('translate', ['language']),
		},
		onLoad() {
			uni.setNavigationBarTitle({
				title:this.$getText('通用')
			})
		},
		methods: {
			screenshot(e){
				this.$store.commit('common/setConfig', {screenshot: e.target.value});
			},
			position(e){
				this.$store.commit('common/setConfig', {position: e.target.value});
			},
			map(e){
				this.$store.commit('common/setConfig', {map: e.target.value});
			}
		}
	}
</script>

<style>
	
</style>
